Zum Hauptinhalt springen

Step 1: Enter the amount paid on the invoice

The amount paid is stored in the "PaidFC" property in the ReceiptInvoiceDTO class. This is gross and stored in the foreign currency of the receipt.

The c-entron "Payment Receipt" module is used as an example.

Total amountIs the invoice amount gross?
Discount amountGross invoice amount minus any cash discount, if applicable under the payment terms.
Amount already paidIn c-entron, the amount paid is stored in a property called PaidFC. This represents the total "paid" amount of the invoice.
When a credit note is created, the credit note amount is also entered in PaidFC. PaidFC in gross / foreign currency
Outstanding amountThe remaining amount of the invoice in gross.
Amount paidThe amount to be paid, which should be entered in the c-entron input mask. The "Clear amount" function enters the "Open amount" in the "Amount paid" field.

Web service method call to enter the paid amount in the invoice

var request = new UpdateReceiptIsPaidRequest  
{
ReceiptKind = CentronObjectKindNumeric.InvoiceClass,
ReceiptI3D = 123,
IsPaid = false,
PaidFC = 5000,
ConcurrencyControlGuid = "b9f30717-4dc7-479e-a616-9a4845bf6c0e",
ModuleOrAction = "Payment received",
};

return this.\_connection.CallWebServiceMethodWithSingleResultAsync(f => f.UpdateReceiptIsPaid(this.\_connection.GetRequest(request)));

ReceiptKindDocument type -> CentronObjectKindNumeric.InvoiceClass
ReceiptI3DI3D of the document
IsPaidBoolean value indicating whether the invoice has been paid or not. This controls the "status" value of the invoice.
IsPaid = True sets the status of the invoice to 2 (invoice is paid).
IsPaid = False sets the status of the invoice to 1 (invoice is open).
IsPaid = NULL Nothing is changed in the status. For partial payments, set this to False because the invoice should remain "open." Only when the invoice is considered "closed" should the value be set to True.
PaidFCThe total amount paid for the invoice. PaidFC = [PaidFC of the invoice] + [Amount paid]
ConcurrencyControlGuidUse the value from the loaded invoice via GetReceiptByI3D or receipt search. Whenever a new version of the RE is saved, the GUID is also renewed. Security feature to prevent overwriting invoice updates made by other users.
ModuleOrActionText is used for a log entry on the invoice if the "amount paid" has changed. The payment receipt module transfers "payment received" as the value here, for example.

Step 2: Create an entry when payment is received

The entry in incoming payments is optional. For c-entron, only the invoice status and the paid amount of the invoice (PaidFC) are relevant.

var dto = new IncomingPaymentDTO  
{
Amount = 5000,
Number = 14501,
CreatedAt = DateTime.Now,
InvoiceAmount = 50000,
PaymentDate = this.PaymentDate,
Comment = this.Comment,
ResidualAmount = 45000,
AccountStatementDate = this.AccountStatementDate,
AccountStatementNumber = this.AccountStatementNumber,
EmployeeI3D = 1,
InvoiceHeaderI3D = 123,
IsClosed = this.CloseReceipt,
BankAccount = 'IBAN'
};

await ClassContainer.Instance.WithInstance(async (IPaymentsLogic logic) => await logic.SaveIncomingPayment(dto)).ThrowIfError();

AmountThe [amount paid]. The value entered in the [Amount paid] field in the payment receipt screen.
NumberInvoice number.
CreatedAtTimestamp indicating when the data record was created.
InvoiceAmountIncludes the gross amount of the invoice.
PaymentDateDate on which the payment was made.
CommentComment on the booking.
ResidualAmountRemaining balance of the invoice. Gross amount - amount paid
Account Statement DateDate of the bank statement.
Account Statement NumberBank statement number.
EmployeeI3DID of the employee who entered the data record.
InvoiceHeaderI3DInvoice ID.
IsClosedIndicates whether the invoice was closed with this incoming payment posting or not.
BankAccountIBAN on the bank statement.